<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=750, initial-scale=0.5">
    <title>照片万花筒特效</title>
    <link rel="stylesheet" href="./css/index.css">
    <script  src="./js/jquery-3.5.1.min.js"></script>
    <script  src="./js/snowfall.jquery.js"></script>
    <script>
        const WIDTH = 750
        const mobileAdapter = () => {
          let scale = screen.width / WIDTH
          let content = `width=${WIDTH}, initial-scale=${scale}, maximum-scale=${scale}, minimum-scale=${scale}`
          let meta = document.querySelector('meta[name=viewport]')
          if (!meta) {
            meta = document.createElement('meta')
            meta.setAttribute('name', 'viewport')
            document.head.appendChild(meta)
          }
          meta.setAttribute('content',content)
        }
        mobileAdapter()
        window.onorientationchange = mobileAdapter //屏幕翻转时再次执行
      </script>    
</head>
<body>
    <div class="wonhot">
        <div class="continaner">
            <img src="./images/1.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="images/2.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="./images/3.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="./images/4.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="./images/5.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="./images/6.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="./images/7.jpg" alt="">
        </div>
        <div class="continaner">
            <img src="./images/8.jpg" alt="">
        </div>
    </div>
    <div class="heart"></div>
    <script>
        $(document).snowfall({flakeCount : 100, maxSpeed : 10});
    </script>
</body>
</html>